package ${package.Dto};

<#if swagger>
    import io.swagger.annotations.ApiModel;
    import io.swagger.annotations.ApiModelProperty;
</#if>
<#if superDtoClassPackage??>
    import ${superDtoClassPackage};
</#if>
<#if entityLombokModel>
    import lombok.Getter;
    import lombok.Setter;
</#if>

/**
* <p>
    * ${table.comment!}
    * </p>
*
* @author ${author}
* @since ${date}
*/
<#if dtoLombokModel>
    @Getter
    @Setter
</#if>
<#if swagger>
    @ApiModel(value = "${table.dtoName}对象", description = "${table.comment!}")
</#if>
<#if superDtoClass??>
    public class ${table.dtoName} extends ${superDtoClass}<${idTypeName}>{
<#else>
    public class ${table.dtoName} {
</#if>
<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if field.keyFlag>
        <#assign keyPropertyName="${field.propertyName}"/>
    </#if>

    <#if field.comment!?length gt 0>
        <#if swagger>
            @ApiModelProperty("${field.comment}")
        <#else>
            /**
            * ${field.comment}
            */
        </#if>
    </#if>
    private ${field.propertyType} ${field.propertyName};
</#list>
<#------------  END 字段循环遍历  ---------->

<#if !dtoLombokModel>
    <#list table.fields as field>
        <#if field.propertyType == "boolean">
            <#assign getprefix="is"/>
        <#else>
            <#assign getprefix="get"/>
        </#if>
        public ${field.propertyType} ${getprefix}${field.capitalName}() {
        return ${field.propertyName};
        }

        public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
        this.${field.propertyName} = ${field.propertyName};
        }
    </#list>
</#if>
}
